#ifdef _WIN32

#endif
#include <algorithm>
#include <iostream>
#include <iomanip>
#include <sstream>
#include <string>
#include <list>
#include <bitset>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <cmath>
#include <cassert>
#include <ctime>
#include <numeric>
#include <functional>
#include <valarray>
#include <complex>
using namespace std;

const int dx[]={0,-1,0,1,-1,1, 1,-1};
const int dy[]={1,0,-1,0, 1,1,-1,-1};
const double eps=1e-8;

typedef long long LL;

typedef pair<int,int> pii;
typedef vector<int> vi;

#define sz(a) a.size()
#define fori(i,a,b) for(int i(a),_b(b);i<=_b;++i)
#define ford(i,a,b) for(int i(a),_b(b);i>=_b;--i)
#define forn(i,n) fori(i,0,n-1)
#define fora(i,a) forn(i,sz(a))

#define all(a) a.begin(),a.end()

#define pb push_back
#define clear0(a) memset(a,0,sizeof(a))

#define two(X) (1LL<<(X))

const int base=10000;
const int lengthbase=4;
const int maxarray=120;

class PerfectSequences {
struct bignum
{
    int num[maxarray],length;
    bool positive;
    bignum() {positive=length=1; clear0(num);}
};
bignum Equal(LL a)
{
    bignum b;
    if (a<0) {b.positive=0; a=-a;}
    if (a!=0) b.length--;
    while (a>0)
    {
        b.num[b.length++]=a%base;
        a/=base;
    }
    return b;
}
void cutdownzero(bignum &c) // for every a and b
{
    while (c.length>1 && c.num[c.length-1]==0) c.length--;
}
int compbig_positive(bignum a,bignum b) // -1:a>b 0:a=b 1:a<b; for a>0 && b>0
{
    if (a.length!=b.length)
        if (a.length<b.length) return 1; else return -1;
    ford(i,a.length-1,0)
        if (a.num[i]!=b.num[i])
            if (a.num[i]<b.num[i]) return 1; else return -1;
    return 0;
}
int compbignum(bignum a,bignum b) // -1:a>b 0:a=b 1:a<b; for every a and b
{
    if (a.positive!=b.positive)
    {
        if (a.positive) return -1;
        return 1;
    }
    int ans=compbig_positive(a,b);
    if (!a.positive) ans=-ans;
    return ans;
}
bignum add(bignum a,bignum b) // just use for a>0 && b>0
{
    bignum c;
    c.length=max(a.length,b.length);
    int mem=0;
    forn(i,c.length)
    {
        int sum=a.num[i]+b.num[i]+mem;
        if (sum>=base)
        {
            mem=sum/base;
            sum%=base;
        } else mem=0;
        c.num[i]=sum;
    }
    if (mem>0) c.num[c.length++]=mem;
    return c;
}
bignum sub(bignum a,bignum b) // just use for a>0 && b>0
{
    bignum c;
    if (compbig_positive(a,b)==1)
    {
        c.positive=0;
        swap(a,b);
    }
    c.length=a.length;
    int mem=0;
    forn(i,c.length)
    {
        int subtract=a.num[i]-b.num[i]+mem;
        if (subtract<0)
        {
            mem=-1;
            subtract+=base;
        } else mem=0;
        c.num[i]=subtract;
    }
    cutdownzero(c);
    return c;
}
bignum mulbase(bignum a,int times) // every a can be used
{
    a.length+=times;
    ford(i,a.length-1,times)
        a.num[i]=a.num[i-times];
    forn(i,times) a.num[i]=0;
    return a;
}
bignum mul(bignum a,bignum b) // every a and b can be used
{
    bignum sum;
    forn(i,b.length)
    {
        bignum c;
        c.length=a.length;
        int mem=0;
        forn(j,a.length)
        {
            int multi=a.num[j]*b.num[i]+mem;
            if (multi>=base)
            {
                mem=multi/base;
                multi%=base;
            } else mem=0;
            c.num[j]=multi;
        }
        if (mem>0) c=add(mulbase(Equal(mem),c.length),c);
        c=mulbase(c,i);
        cutdownzero(c);
        sum=add(sum,c);
    }
    if (compbignum(sum,Equal(0))!=0)
        sum.positive=!(a.positive^b.positive);
    else sum.positive=1;
    return sum;
}
public:
	string fixIt(vector <int> seq) {
		vector<bignum> seqbignum,mul_without_a_i_sub1;
		bignum sum;
        fora(i,seq)
        {
            seqbignum.pb(Equal(seq[i]));
            sum=add(sum,seqbignum[i]);
        }
        fora(i,seq)
        {
            bignum multi=Equal(1);
            fora(j,seq)
                if (i!=j) multi=mul(multi,seqbignum[j]);
            mul_without_a_i_sub1.pb(sub(multi,Equal(1)));
        }
        fora(i,seq)
        {
            int forw=1;
            if (!mul_without_a_i_sub1[i].positive) forw=-1;
            bignum left=sub(sum,seqbignum[i]);
            int l=-1,r=round(1e9);
            while (l+1<r)
            {
                int m=(l+r)/2;
                bignum right=mul(mul_without_a_i_sub1[i],Equal(m));
                int comp=compbignum(right,left);
                if (comp==0)
                {
                    if (compbignum(Equal(m),seqbignum[i])!=0) return "Yes";
                    break;
                }
                if (comp==forw) l=m; else r=m;
            }
        }
        return "No";
	}
};



// BEGIN KAWIGIEDIT TESTING
// Generated by KawigiEdit-pf 2.3.0
#include <iostream>
#include <string>
#include <vector>
#include <ctime>
#include <cmath>
using namespace std;
bool KawigiEdit_RunTest(int testNum, vector <int> p0, bool hasAnswer, string p1) {
	cout << "Test " << testNum << ": [" << "{";
	for (int i = 0; int(p0.size()) > i; ++i) {
		if (i > 0) {
			cout << ",";
		}
		cout << p0[i];
	}
	cout << "}";
	cout << "]" << endl;
	PerfectSequences *obj;
	string answer;
	obj = new PerfectSequences();
	clock_t startTime = clock();
	answer = obj->fixIt(p0);
	clock_t endTime = clock();
	delete obj;
	bool res;
	res = true;
	cout << "Time: " << double(endTime - startTime) / CLOCKS_PER_SEC << " seconds" << endl;
	if (hasAnswer) {
		cout << "Desired answer:" << endl;
		cout << "\t" << "\"" << p1 << "\"" << endl;
	}
	cout << "Your answer:" << endl;
	cout << "\t" << "\"" << answer << "\"" << endl;
	if (hasAnswer) {
		res = answer == p1;
	}
	if (!res) {
		cout << "DOESN'T MATCH!!!!" << endl;
	} else if (double(endTime - startTime) / CLOCKS_PER_SEC >= 2) {
		cout << "FAIL the timeout" << endl;
		res = false;
	} else if (hasAnswer) {
		cout << "Match :-)" << endl;
	} else {
		cout << "OK, but is it right?" << endl;
	}
	cout << "" << endl;
	return res;
}
int main() {
	bool all_right;
	bool disabled;
	bool tests_disabled;
	all_right = true;
	tests_disabled = false;
	
	vector <int> p0;
	string p1;
	
	{
	// ----- test 0 -----
	disabled = false;
	int t0[] = {1,3,4};
			p0.assign(t0, t0 + sizeof(t0) / sizeof(t0[0]));
	p1 = "Yes";
	all_right = (disabled || KawigiEdit_RunTest(0, p0, true, p1) ) && all_right;
	tests_disabled = tests_disabled || disabled;
	// ------------------
	}
	
	{
	// ----- test 1 -----
	disabled = false;
	int t0[] = {1,2,3};
			p0.assign(t0, t0 + sizeof(t0) / sizeof(t0[0]));
	p1 = "No";
	all_right = (disabled || KawigiEdit_RunTest(1, p0, true, p1) ) && all_right;
	tests_disabled = tests_disabled || disabled;
	// ------------------
	}
	
	{
	// ----- test 2 -----
	disabled = false;
	int t0[] = {1,4,2,4,2,4};
			p0.assign(t0, t0 + sizeof(t0) / sizeof(t0[0]));
	p1 = "No";
	all_right = (disabled || KawigiEdit_RunTest(2, p0, true, p1) ) && all_right;
	tests_disabled = tests_disabled || disabled;
	// ------------------
	}
	
	{
	// ----- test 3 -----
	disabled = false;
	int t0[] = {1000000,1,1,1,1,2};
			p0.assign(t0, t0 + sizeof(t0) / sizeof(t0[0]));
	p1 = "Yes";
	all_right = (disabled || KawigiEdit_RunTest(3, p0, true, p1) ) && all_right;
	tests_disabled = tests_disabled || disabled;
	// ------------------
	}
	
	{
	// ----- test 4 -----
	disabled = false;
	int t0[] = {8};
			p0.assign(t0, t0 + sizeof(t0) / sizeof(t0[0]));
	p1 = "Yes";
	all_right = (disabled || KawigiEdit_RunTest(4, p0, true, p1) ) && all_right;
	tests_disabled = tests_disabled || disabled;
	// ------------------
	}
	
	{
	// ----- test 5 -----
	disabled = false;
	int t0[] = {2,0,2};
			p0.assign(t0, t0 + sizeof(t0) / sizeof(t0[0]));
	p1 = "No";
	all_right = (disabled || KawigiEdit_RunTest(5, p0, true, p1) ) && all_right;
	tests_disabled = tests_disabled || disabled;
	// ------------------
	}
	
	if (all_right) {
		if (tests_disabled) {
			cout << "You're a stud (but some test cases were disabled)!" << endl;
		} else {
			cout << "You're a stud (at least on given cases)!" << endl;
		}
	} else {
		cout << "Some of the test cases had errors." << endl;
	}
	return 0;
}
// END KAWIGIEDIT TESTING//Powered by KawigiEdit-pf 2.3.0
//With unused code cleaner (beta) by ahmed_aly
